using BCW.Friends;
using I2.Loc;

public class TanksGameMode : TeamGameMode
{
	public override void StartRound()
	{
		base.StartRound();
		CoroutineRunner.Instance.StartCoroutine(PVPManager.instance.WaitForSectorsLoad(delegate
		{
			TDMController.instance.SetStartPVP(true);
			PlayerBehavior.MyPlayer.FirstSpawn(3f);
			CoroutineRunner.Invoke(3f, delegate
			{
				GameInfoWindow.instance.HideInterface();
				MapWindow.instance.gameObject.SetActive(true);
				GameController.instance.showWindowGame();
			});
		}));
	}

	public override void RestartRound()
	{
		base.RestartRound();
		MapWindow.instance.gameObject.SetActive(false);
		TDMController.instance.RestartTDM();
		if (FriendsUIGame.instance != null)
		{
			FriendsUIGame.instance.CleanInvitePlayer();
		}
		controllerConnectPhoton.thisScript.LeaveRoom();
	}

	public override string EndGameModeTitle()
	{
		return ScriptLocalization.Get("Game_Common/tank_over");
	}
}
